home *** CD-ROM | disk | FTP | other *** search
/ Mac Mania 6 / MacMania 6.toast / / Tools&Utilities / TouchMe 1.2□ / touchMe 1.2 Folder / touchMe source codes / CW11 PP source / source / Common Lib / CRadioButton.cp < prev    next >
Encoding:
Text File  |  1997-04-25  |  2.2 KB  |  107 lines  |  [TEXT/CWIE]

  1. // ==================================================
  2. //    CRadioButton.cp
  3. //    Copyright (C) 1996-1997 Mizutori Tetsuya
  4. //    July 4, 1996; February 3, 1997.
  5. // ==================================================
  6. //    All documents are pretty-printed in 10-point Geneva font.
  7.  
  8. #include <UDrawingState.h>
  9.  
  10. #include "touchMeConstants.h"
  11. #include "CRadioButton.h"
  12.  
  13.  
  14. // --------------------------------------------------
  15. //        • CreateRadioButtonStream [static]
  16. // --------------------------------------------------
  17.  
  18. CRadioButton *
  19. CRadioButton::CreateRadioButtonStream(
  20.     LStream *        inStream )
  21. {
  22.     return new CRadioButton( inStream );
  23. }
  24.  
  25.  
  26. // --------------------------------------------------
  27. //        • CRadioButton
  28. // --------------------------------------------------
  29.  
  30. CRadioButton::CRadioButton()
  31. {
  32. }
  33.  
  34.  
  35. // --------------------------------------------------
  36. //        • CRadioButton(SPaneInfo&, MessageT, Int32, ResIDT, Str255)
  37. // --------------------------------------------------
  38.  
  39. CRadioButton::CRadioButton(
  40.     const SPaneInfo &    inPaneInfo,
  41.     MessageT            inValueMessage,
  42.     Int32            inValue,
  43.     ResIDT            inTextTraitsID,
  44.     Str255            inTitle )
  45.         : LStdRadioButton( inPaneInfo, inValueMessage,
  46.             inValue, inTextTraitsID, inTitle )
  47. {
  48. }
  49.  
  50.  
  51. // --------------------------------------------------
  52. //        • CRadioButton(const CRadioButton&)
  53. // --------------------------------------------------
  54.  
  55. CRadioButton::CRadioButton(
  56.     const CRadioButton &    inOriginal )
  57.         : LStdRadioButton( inOriginal )
  58. {
  59. }
  60.  
  61.  
  62. // --------------------------------------------------
  63. //        • CRadioButton(LStream*)
  64. // --------------------------------------------------
  65.  
  66. CRadioButton::CRadioButton(
  67.     LStream *        inStream )
  68.         : LStdRadioButton( inStream )
  69. {
  70. }
  71.  
  72.  
  73. // --------------------------------------------------
  74. //        • ~CRadioButton
  75. // --------------------------------------------------
  76.  
  77. CRadioButton::~CRadioButton()
  78. {
  79. }
  80.  
  81. // --------------------------------------------------
  82. //        • ListenToMessage
  83. // --------------------------------------------------
  84.  
  85. void
  86. CRadioButton::ListenToMessage(
  87.     MessageT        inMessage,
  88.     void *        ioParam )
  89. {
  90. #pragma unused ( ioParam )
  91.  
  92.     switch ( inMessage ) {
  93.  
  94.         case msg_Main_CrCheckbox:
  95.         case msg_Main_MdCheckbox:
  96.             if ( IsEnabled() ) {
  97.                 Disable();
  98.             } else {
  99.                 Enable();
  100.             }
  101.             break;
  102.  
  103.     }
  104. }
  105.  
  106. // end of program
  107.